# -*- coding:utf-8 -*-

# 初始化空元组
t = ()
print(t, type(t))  # ((), <type 'tuple'>)

# 单元素元组
t2 = 'a',
print(t2, type(t2))  # (('a',), <type 'tuple'>)

# 元组嵌套
t3 = t2, (1, 2, 3)
print(t3) # # (('a',), (1, 2, 3))

# 赋值，元组不可变
# t3[0] = () #tuple' object does not support item assignment

# 元组拆封
a,b = t3
print(a) # ('a',)
# t4 = 'a','b','c'
# x,y = t4
# print(x,y) #too many values to unpack

